package com.neu.base;

public class AuthContants {

    /**
     * 请求头中携带token的key
     */
    public static final String TOKEN_HEADER = "Authorization";


    /**
     * redis中存储token的key
     */
    public static final String REDIS_KEY_AUTH_TOKEN = "auth:token:";
    /**
     * redis中存储邀请token的key
     */
    public static final String REDIS_KEY_INVITE_TOKEN = "invite:token:";
    /**
     * redis中存储验证码的key
     */
    public static final String REDIS_KEY_AUTH_CAPTCHA = "auth:captcha:";
    /**
     * redis中存储用户信息的key
     */
    public static final String REDIS_KEY_AUTH_USER_DETAIL = "auth:user:detail:";


    /**
     * 刷新token的阈值 毫秒
     */
    public static final long REFRESH_TOKEN_THRESHOLD = 60 * 1000 * 10;//10分钟
    /**
     * 登录失败后锁定时间 秒
     */
    public static final long LOCK_TIME_DURATION = 60 * 2;//2分钟

    /**
     * 用户登录次数
     */
    public static final String USERLOGINTIMES = "auth:user:loginTimes:";
    public static final String USERLOGINTIMES_IP = "auth:user:loginTimes:ip:";
    /**
     * 用户登录次数最大次数
     */
    public static final int MAX_ATTEMPTS = 5;
}
